package com.dai.bookkeeping.frag_record;
import com.dai.bookkeeping.R;
import com.dai.bookkeeping.db.DBManager;
import com.dai.bookkeeping.db.TypeBean;
import java.util.List;

/**
*记录页面当中的支出模块
 */
public class OutcomeFragment extends BaseRecordFragment {
    @Override
    public void loadDataToGV() {
        super.loadDataToGV();
        //获取数据库当中的数据源
        List<TypeBean> outlist=DBManager.getTypeList(0);
        //添加数据
        typeList.addAll(outlist);
        //更新adapter
        adapter.notifyDataSetChanged();
        typeTv.setText("其他");
        typeIv.setImageResource(R.mipmap.ic_qita_fs);
    }

    @Override
    public void saveAccountToDB() {
        accountBean.setKind(0);
        DBManager.insertItemToAccounttb(accountBean);
    }
}